
#ifndef _MEMBER_BDOUBLESPINBOX_H_
#define _MEMBER_BDOUBLESPINBOX_H_

#include <BButton>
#include <BDoubleSpinBox>
#include "ILineBlock.h"

namespace BWE
{
	class member_BDoubleSpinBox : public BObject
	{
		friend class BDoubleSpinBox;
	public:
		member_BDoubleSpinBox(BDoubleSpinBox* doubleSpinbox);
		~member_BDoubleSpinBox();

		bool freshSizes();
		bool freshRects();
		void freshInputLine();
		void textEdited();

		void slotButtonClicked(BObject* object);

		BDoubleSpinBox*		boss;
		Align				align;
		double				value;
		int					decimals;
		double				step;
		BRanged				range;
		BString				prefix;
		BString				suffix;
		BButton*			upButton;
		BButton*			downButton;
		bool				readOnly;
		bool				formulable;
		int					bitNum;
		BReal				blinkTime;
		BReal				blinkTick;
		bool				blinkShown;

		bool				dirtySize;
		BString				t_prefix;
		BSize				prefixSize;
		BRect				prefixRect;
		BString				t_suffix;
		BSize				suffixSize;
		BRect				suffixRect;
		BRect				textArea;

		bool				dirty;
		bool				editing;
		BReal				focusedTime;
		bool				hovered;
		bool				pressed;
		int					pressedIndex;
		int					hoverIndex;
		ILineBlock			block;
		bool				dirtyLine;
		BPoint				lineBegin;
		BPoint				lineEnd;
	};
}

#endif